﻿<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>限制图片最大宽高</title>
<script type="text/javascript" src="/js/lib/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="jquery.imageProportion.js"></script>
</head>
<body>
<!--dom-->
<hr/>
超宽
<img src="images/01.jpg" class="imageProportion" />
<hr/>
超高
<img src="images/02.jpg" class="imageProportion" />
<hr/>
小宽
<img src="images/03.jpg" class="imageProportion" />
<hr/>
小高
<img src="images/04.jpg" class="imageProportion" />
<!--/dom-->
	

<script type="text/javascript">
$(function(){
	imageProportion({
		dom:$(".imageProportion"),
		maxWidth:400,
		maxHeight:300
	})
})
</script>
</body>
</html>



